package com.itqf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2021/1/20
 * @Time: 上午9:55
 */
@Controller
//@RequestMapping  映射前端请求
@RequestMapping("/user") //跟路径  http://localhost:8080/user
public class MyController {

    @RequestMapping("/doLogin") //http://localhost:8080/user/doLogin
    public String doLogin(){//
        System.out.println("test .......");

        //逻辑视图
       // return "success";// 前缀+逻辑视图+后缀  /jsp/success.jsp
        //物理视图
        return  "/jsp/success.jsp";
    }

    @RequestMapping("/hello") //http://localhost:8080/user/doLogin
    public String hello(){//
        System.out.println("hello,我的第一个SpringMVC案例 .......");

        //逻辑视图
        //return "success";// 前缀+逻辑视图+后缀  /jsp/success.jsp

        //物理视图
        return  "/jsp/success.jsp";
    }


}
